Box: Restore an accidentally deleted comment
authorDaniel Boles <dboles@src.gnome.org>
Mon, 26 Dec 2016 10:57:51 +0000 (10:57 +0000)
committerDaniel Boles <dboles@src.gnome.org>
Mon, 26 Dec 2016 10:57:51 +0000 (10:57 +0000)
Also, split a MAX() onto its own line to match the others.

gtk/gtkbox.c

index 15cbb6c36a9618e1a4293642ba1bd98bcd677934..af33b27ffb7c6d3d7fd5eca15083c837fbf184e8 100644 (file)
@@ -560,6 +560,7 @@ gtk_box_size_allocate_no_center (GtkWidget           *widget,
     }
   else
     {
+      /* Bring children up to size first */
       extra_space -= children_minimum_size;
       extra_space = MAX (0, extra_space);
       extra_space = gtk_distribute_natural_allocation (extra_space, nvis_children, sizes);
@@ -908,7 +909,8 @@ gtk_box_size_allocate_with_center (GtkWidget           *widget,
           /* Distribute the remainder naturally on each side */
           extra_space = MIN ((box_size - center_size) / 2 - min_size[packing],
                              box_size - center_size - min_size[0] - min_size[1]);
-          extra_space = gtk_distribute_natural_allocation (MAX (0, extra_space), nvis[packing], sizes[packing]);
+          extra_space = MAX (0, extra_space);
+          extra_space = gtk_distribute_natural_allocation (extra_space, nvis[packing], sizes[packing]);
 
           /* Calculate space which hasn't distributed yet,
            * and is available for expanding children.